From 85da0732b392478748f84c6ce5e2587d27565e7a Mon Sep 17 00:00:00 2001 From: Hans van Kranenburg Date: Wed, 20 Dec 2017 16:02:45 +0100 Subject: [PATCH] debian/bin/genorig.py: repair build orig from repo By picking up the repo provided to the script and kicking the git archive process into that direction, we can at least do this now: ~/build/xen/debian-xen (master) 6-$ debian/bin/genorig.py ~/src/git/xen Generate tarball ../orig/xen_4.9.1.orig.tar.xz ...given that the newest changelog entry is e.g. 4.9.1-1 There's probably more things that can be improved in here, but let's take one step at a time. --- debian/bin/genorig.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/bin/genorig.py b/debian/bin/genorig.py index e9fcd194c8..74aacd8fdc 100755 --- a/debian/bin/genorig.py +++ b/debian/bin/genorig.py @@ -17,6 +17,7 @@ class Main(object): def __init__(self, options, repo): self.options = options + self.repo = repo self.changelog_entry = Changelog(version=VersionXen)[0] self.source = self.changelog_entry.source @@ -46,7 +47,8 @@ class Main(object): try: with open(out, 'wb') as f: tag = self.options.tag or 'HEAD' - p1 = subprocess.Popen(('git', 'archive', '--prefix', '%s/' % self.orig_dir, tag), stdout=subprocess.PIPE) + _cmd = ('git', 'archive', '--prefix', '%s/' % self.orig_dir, tag) + p1 = subprocess.Popen(_cmd, stdout=subprocess.PIPE, cwd=self.repo) subprocess.check_call(('xz', ), stdin=p1.stdout, stdout=f) if p1.wait(): raise RuntimeError -- 2.30.2